/* 全局样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  /* 移动端适配 - 基于设计稿宽度375px */
  @media screen and (max-width: 375px) {
    font-size: 14px;
  }
  @media screen and (min-width: 376px) and (max-width: 414px) {
    font-size: 15px;
  }
  @media screen and (min-width: 415px) {
    font-size: 16px;
  }
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f5f5f5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 移动端适配 */
@media (max-width: 768px) {
  html {
    font-size: 14px;
  }
}

/* 链接样式 */
a {
  color: #1677ff;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #4096ff;
}

/* 按钮样式重置 */
button {
  border: none;
  outline: none;
  cursor: pointer;
  font-family: inherit;
}

/* 输入框样式重置 */
input, textarea {
  border: none;
  outline: none;
  font-family: inherit;
}

/* 图片样式 */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* 列表样式重置 */
ul, ol {
  list-style: none;
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* 工具类 */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-column {
  display: flex;
  flex-direction: column;
}

.hidden {
  display: none;
}

.visible {
  display: block;
}

/* 间距工具类 */
.m-0 { margin: 0; }
.m-1 { margin: 4px; }
.m-2 { margin: 8px; }
.m-3 { margin: 12px; }
.m-4 { margin: 16px; }
.m-5 { margin: 20px; }

.p-0 { padding: 0; }
.p-1 { padding: 4px; }
.p-2 { padding: 8px; }
.p-3 { padding: 12px; }
.p-4 { padding: 16px; }
.p-5 { padding: 20px; }

/* 颜色工具类 */
.text-primary { color: #1677ff; }
.text-success { color: #52c41a; }
.text-warning { color: #faad14; }
.text-danger { color: #ff4d4f; }
.text-info { color: #13c2c2; }
.text-muted { color: #999; }

/* 响应式工具类 */
@media (max-width: 768px) {
  .mobile-hidden {
    display: none;
  }
  
  .mobile-visible {
    display: block;
  }
}

@media (min-width: 769px) {
  .desktop-hidden {
    display: none;
  }
  
  .desktop-visible {
    display: block;
  }
}
